package org.example.userdefine.示例代码.parent;

import lombok.Data;
import org.example.cicdi.jpa.SecondBaseEntity;
import org.example.codegenerate.modelext.WebVo.Enum.EnumModelType;
import org.example.codegenerate.modelext.WebVo.Enum.EnumPageFieldType;
import org.example.codegenerate.modelext.WebVo.annotation.Column.*;
import org.example.codegenerate.modelext.WebVo.annotation.table.TVo;
import org.example.codegenerate.modelext.WebVo.annotation.table.WVo;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;


@WVo(destinationOutPutDir = "D:\\eclipse2018-workspace\\jeecg-boot\\singletable", modeltype = EnumModelType.ONE/*, packageName = "singlecicdi"*/)
@TVo(entityName = "CesShopGoods", tableTxt = "商品"/*, enumTableType = EnumTableType.SINGLETABLE*//*,formTemplate = "1"*/)
@Data
@Entity
@Table(name = "ces_shop_goods")

public class CesShopGoods extends SecondBaseEntity {

	@Column(name = "name" ,columnDefinition="varchar(120)  COMMENT '商品名字'",/*nullable = true,*/ length = 120)
	//@DbVo(dbFieldTxt ="商品名字",enumDbType = EnumDbType.String)
	@PageVo(fieldShowType =  EnumPageFieldType.文本框,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0/*,queryMode = "single",sortFlag = "N"*/,orderNum = 7)
	@ValidateVo
	@ForeignKeyVo
	@IndexVo
	@SearchVo
	@Other
	private String name;

	@Column(name = "price" ,columnDefinition="double(32,0) COMMENT '价格'",/*nullable = true,*/length = 120)
	//@DbVo(dbFieldTxt ="价格")
	@PageVo(fieldShowType =EnumPageFieldType.文本框,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0/*,queryMode = "single",sortFlag = "N"*/,orderNum = 8)
	@ValidateVo()
	@ForeignKeyVo
	@IndexVo
	@SearchVo
	@Other
	private BigDecimal price;

	@Column(name = "chuc_date" ,columnDefinition="datetime COMMENT '出厂时间'",/*nullable = true,*/length = 120)
	//@DbVo(dbFieldTxt ="出厂时间")
	@PageVo(fieldShowType = EnumPageFieldType.日期yyyymmdd,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly =0/*,queryMode = "single",sortFlag = "N"*/,orderNum = 9)
	@ValidateVo
	@ForeignKeyVo
	@IndexVo
	@SearchVo
	@Other
	private Date chucDate;

	@Column(name = "contents" ,columnDefinition="Text COMMENT '商品简介'",/*nullable = true,*/ length = 120)
	//@DbVo(dbFieldTxt =
	@PageVo(fieldShowType = EnumPageFieldType.富文本,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0/*,queryMode = "single",sortFlag = "N"*/,orderNum = 10)
	@ValidateVo
	@ForeignKeyVo
	@IndexVo
	@SearchVo
	@Other
	private String contents;

	@Column(name = "good_type_id" ,columnDefinition="varchar(120) COMMENT '商品分类'",/*nullable = true, */length = 120)
	//@DbVo(dbFieldTxt ="商品分类")
	@PageVo(fieldShowType = EnumPageFieldType.自定义树控件,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0/*,queryMode = "single",sortFlag = "N"*/,orderNum = 11)
	@ValidateVo(dictField = "0",dictTable = "ces_shop_type",dictText = "id,pid,name,has_child")
	@ForeignKeyVo
	@IndexVo
	@SearchVo
	@Other
	private String goodTypeId;

}
